/**

This file is part of MaCI/GIMnet.

MaCI/GIMnet is free software: you can redistribute it and/or modify it 
under the terms of the GNU Lesser General Public License as published 
by the Free Software Foundation, either version 3 of the License, or 
(at your option) any later version.

MaCI/GIMnet is distributed in the hope that it will be useful, but WITHOUT 
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public 
License for more details.

You should have received a copy of the GNU Lesser General Public 
License along with GIMnet. (See COPYING.LESSER) If not, see 
<http://www.gnu.org/licenses/>.

**/
#ifndef MAREKBOT_SETTINGS_H
#define MAREKBOT_SETTINGS_H
/*
* Avant dimensions and settings
* units are meters and kilograms
*/

//hull dimensions
#define HULL_LENGTH 0.160
#define HULL_HEIGHT 0.120
#define HULL_WIDTH 0.120

//mass
#define HULL_MASS 2.5
#define WHEEL_MASS 0.1

//distance from ground to the base of the hull
#define GROUND_CLEARANCE 0.030

//wheels
#define DRIVING_WHEEL_RADIUS 0.083
#define DRIVING_WHEEL_WIDTH 0.015

//caster wheels
#define CASTER_WHEEL_RADIUS 0.015
//caster wheel distance from robots center
#define CASTER_WHEEL_Z -0.090
//robot works best when casters are a bit off ground
#define CASTER_WHEEL_Y 0.001

//wheel positions from hull's center
#define WHEELBASE 0.162
#define DRIVING_WHEEL_X (WHEELBASE/2.0)
#define DRIVING_WHEEL_Z 0.025

//laser scanner position
#define SCANNER_OFFSET_Z 0.07
#define SCANNER_OFFSET_Y 0.08

//hull z-coordinate
#define HULL_Y (GROUND_CLEARANCE+HULL_HEIGHT/2.0)

//other settings
#define MAX_MOTOR_SPEED 0.4 //m/s
#define MAX_MOTOR_TORQUE (10)
#define MAX_ANGULAR_SPEED (MAX_MOTOR_SPEED/DRIVING_WHEEL_X)
#define MAX_ACCELERATION 0.2

#define AXLE_FRICTION_TORQUE 0.1

//how often sensor data is sent
#define LASER_INTERVAL 0.125
#define POSITION_INTERVAL 0.05

#define SONAR_INTERVAL 0.1
#define SONAR_RANGE 6.0
#define SONAR_CONE_ANGLE 5.0
#define MID_SONAR_Y 0.120
#define SIDE_SONAR_Y 0.145
#define SIDE_SONAR_ANGLE 38.0
#define SONARS_Z 0.1
#define SONAR_ECHO_ANGLE 30.0

#endif //MAREKBOT_SETTINGS_H

